package com.eshore.norm.controller;


import com.eshore.norm.pojo.dto.NormHost;
import com.eshore.norm.pojo.po.NormResourceProvidersPO;
import com.eshore.norm.service.INormHostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 宿主机列表 前端控制器
 * </p>
 *
 * @author chenjl
 * @since 2024-01-05
 */
@RestController
@RequestMapping("/norm-host")
public class NormHostController {

    @Autowired
    INormHostService iNormHostService;

    @PostMapping("/insert-update")
    public void insertOrUpdateBatch(@RequestBody List<NormHost> entitys){
        iNormHostService.insertOrUpdateBatch(entitys);
    }

    @PostMapping("/data-import")
    public void hostDataImport(@RequestBody NormResourceProvidersPO po){
        iNormHostService.dataImport(po);
    }


}
